home *** CD-ROM | disk | FTP | other *** search
/ CD Fun House 1 / CD Fun House (Wayzata Technology).iso / •AdventureLand• / Adventures / HyperQuest 1.03 ••• / HyperQuest 1.03 еее / background_2766.txt < prev    next >
Text File  |  1990-10-02  |  17KB  |  713 lines

  1. -- background: 2766 from stack: in.03 –µ–µ–µ
  2. -- bmap block id: 15025
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on cardOpened
  8.   global cardID,object,takeFlag,examFlag,prevID,invFlag,holdID,blasting
  9.   global knifeLoc,noduleLoc,ladderLoc,bombLoc,keyLoc,gemLoc,orbLoc
  10.   -- Do any actions here that need to be done for each card opening
  11.   set the cursor to 4
  12.   hide menuBar
  13.   set the blindTyping to false
  14.   get id of card
  15.   put last word of it into room
  16.   if field init = 1 then
  17.     --initialize the room
  18.     put 0 into field init
  19.     repeat with butNum = 1 to 7
  20.       get the icon of card button butNum
  21.       if it<>0 then hide card button butNum
  22.     end repeat
  23.     if knifeLoc=room then show card button knife
  24.     if ladderLoc=room then show card button ladder
  25.     if noduleLoc=room then show card button nodule
  26.     if bombLoc=room then show card button bomb
  27.     if gemLoc=room then show card button gem
  28.     if keyLoc=room then show card button key
  29.     if orbLoc=room then show card button orb
  30.   end if
  31.   put false into examFlag
  32.   put false into takeFlag
  33.   if invFlag then
  34.     put false into invFlag
  35.   else
  36.     put cardID into prevID
  37.   end if
  38.   -- if 'back' is not allowed, have the move handler place the id of the
  39.   -- destination card xxx into cardID before doing 'go to card id xxx'
  40.   -- (use also if change of cave makes going back impossible).
  41.   put room into cardID
  42.   set the scroll of field 1 to 0
  43.   put "" into field 3
  44.   if blasting<>0 then add 1 to blasting
  45.   if blasting=4 then kaBoom
  46. end cardOpened
  47.  
  48. on take
  49.   global takeFlag,examFlag,cardID,object,carried,hortaDead,chase
  50.   global knifeLoc,noduleLoc,ladderLoc,bombLoc,keyLoc,gemLoc,orbLoc,invLoc
  51.   set the cursor to 4
  52.   put false into takeFlag
  53.   hide object
  54.   set lockScreen to true
  55.   push card
  56.   go to card id 10613
  57.   show object
  58.   hide card button "no objects carried"
  59.   put last word of object into obj
  60.   delete first char of obj
  61.   delete last char of obj
  62.   put "put invLoc into " & obj & "Loc" into cmdLine
  63.   do cmdLine
  64.   pop card
  65.   add 1 to carried
  66.   if obj="nodule" and hortaDead="false" then put 1 into chase
  67.   put "taken" into field 3
  68. end take
  69.  
  70. on drop
  71.   global dropFlag,cardID,object,dropRoom,chase,causeOfDeath
  72.   global knifeLoc,noduleLoc,ladderLoc,bombLoc,keyLoc,gemLoc,orbLoc,invLoc
  73.   set the cursor to 4
  74.   put false into dropFlag
  75.   put last word of object into obj
  76.   delete first char of obj
  77.   delete last char of obj
  78.   if chase=2 then
  79.     if obj="nodule" then
  80.       visual wipe up slowly to gray
  81.       put "horta5" into causeOfDeath
  82.     else
  83.       visual wipe up slowly to gray
  84.       put "horta3" into causeOfDeath
  85.     end if
  86.     go card id 3409
  87.     exit drop
  88.   end if
  89.   if obj="nodule" and chase=1 then put 0 into chase
  90.   if dropRoom=cardID then
  91.     show object
  92.   else
  93.     if dropRoom=7465 then
  94.       put "The object falls out of sight into the pit, although you faintly hear it hitting the sides of the pit for almost half a minute." into field 3
  95.       exit drop
  96.     end if
  97.     put last word of object into obj
  98.     delete first char of obj
  99.     delete last char of obj
  100.     show card button obj of card id dropRoom
  101.   end if
  102.   put "put dropRoom into " & obj & "Loc" into cmdLine
  103.   do cmdLine
  104.   put "dropped" into field 3
  105. end drop
  106.  
  107. on use
  108.   global useFlag,examFlag,cardID,object,prevID,holdID
  109.   global chase,causeOfDeath,blasting
  110.   set the cursor to 4
  111.   put last word of object into obj
  112.   delete first char of obj
  113.   delete last char of obj
  114.   put false into useFlag
  115.   if chase=2 then
  116.     put "horta3" into causeOfDeath
  117.     visual wipe up slowly to gray
  118.     go card id 3409
  119.     exit use
  120.   end if
  121.   if obj = "key" then
  122.     put "You better find a lock before trying to use the key." into field 3
  123.     exit use
  124.   end if
  125.   if obj = "knife" then
  126.     put "You wildly brandish the knife.  Mildly impressive, but it serves no purpose here." into field 3
  127.     exit use
  128.   end if
  129.   if obj = "gem" then
  130.     put prevID into holdID
  131.     visual effect iris open very fast to white
  132.     visual effect iris open to white
  133.     visual effect dissolve
  134.     go to card id cardID
  135.     put holdID into prevID
  136.     put "You find that by concentrating on the gem, you are able to cause it to emit a bright flash that hurts your eyes." into field 3
  137.     exit use
  138.   end if
  139.   if obj = "ladder" then
  140.     put "You must find something suitable to tie the ladder to if you want to use it." into field 3
  141.     exit use
  142.   end if
  143.   if obj = "nodule" then
  144.     put "I can't see how you intend to use the silicon nodule." into field 3
  145.     exit use
  146.   end if
  147.   if obj = "bomb" then
  148.     put "The bomb is ticking.  I strongly suggest you drop it and run." into field 3
  149.     if cardID="27851" then
  150.       put 1 into blasting
  151.     else
  152.       put 2 into blasting
  153.     end if
  154.     exit use
  155.   end if
  156.   if obj = "orb" then
  157.     go to card id 7465
  158.     exit use
  159.   end if
  160.   put "there is no use for that object in this situation" into field 3
  161.   -- update carried somewhere if use leads to loss of item.
  162. end use
  163.  
  164. on move
  165.   global direction,cardID,prevID
  166.   if direction = "back" then
  167.     if cardID = prevID then
  168.       beep
  169.       put "There's no going back in this situation." into field 3
  170.       exit move
  171.     end if
  172.     go to card id prevID
  173.     exit move
  174.   end if
  175.   beep
  176.   if direction = "rear" then
  177.     put "Sorry, there is no 'rear' exit behind you in this view." into field 3
  178.     exit move
  179.   end if
  180.   if direction<>"enter" and direction<>"exit"
  181.   then
  182.   put "Sorry, you can't go that way." into field 3
  183. else
  184.   put "Use enter and exit for entering or leaving something," into field 3
  185.   put " such as a car, boat, or building." after field 3
  186. end if
  187. end move
  188.  
  189. on roomChange
  190.   global cardID,oldRoom,newRoom
  191.   global knifeLoc,noduleLoc,ladderLoc,bombLoc,keyLoc,gemLoc,orbLoc
  192.   set the cursor to 4
  193.   if knifeLoc=oldRoom then
  194.     hide card button "knife" of card id oldRoom
  195.     show card button "knife" of card id newRoom
  196.     put newRoom into knifeLoc
  197.   end if
  198.   if noduleLoc=oldRoom then
  199.     hide card button "nodule" of card id oldRoom
  200.     show card button "nodule" of card id newRoom
  201.     put newRoom into noduleLoc
  202.   end if
  203.   if ladderLoc=oldRoom then
  204.     hide card button "ladder" of card id oldRoom
  205.     show card button "ladder" of card id newRoom
  206.     put newRoom into ladderLoc
  207.   end if
  208.   if bombLoc=oldRoom then
  209.     hide card button "bomb" of card id oldRoom
  210.     show card button "bomb" of card id newRoom
  211.     put newRoom into bombLoc
  212.   end if
  213.   if keyLoc=oldRoom then
  214.     hide card button "key" of card id oldRoom
  215.     show card button "key" of card id newRoom
  216.     put newRoom into keyLoc
  217.   end if
  218.   if gemLoc=oldRoom then
  219.     hide card button "gem" of card id oldRoom
  220.     show card button "gem" of card id newRoom
  221.     put newRoom into gemLoc
  222.   end if
  223. end roomChange
  224.  
  225. on kaBoom
  226.   global blasting,cardID,prevID,causeOfDeath,bombLoc,invLoc
  227.   global blastWall,blastDam,flood,hortaDead,oldRoom,newRoom
  228.   put 0 into blasting
  229.   put cardID into temp
  230.   if bombLoc = invLoc then
  231.     put "bomb1" into causeOfDeath
  232.     put 3409 into temp
  233.   end if
  234.   if bombLoc = cardID then
  235.     put "bomb2" into causeOfDeath
  236.     put 3409 into temp
  237.   end if
  238.   hide card button bomb of card id prevID
  239.   visual effect iris open fast to white
  240.   visual effect iris open very fast to black
  241.   visual effect iris open very fast to white
  242.   visual effect dissolve slowly to white
  243.   visual effect dissolve
  244.   put cardID into prevID
  245.   beep
  246.   go to card id temp
  247.   if temp = 3409 then exit kaBoom
  248.   put "The bomb goes off in a nearby room.  The shock of the blast knocks you unconcious (How long? Hard to say -- minutes? hours?)" into field 3
  249.   if bombLoc=24636 then
  250.     if cardID=25762 then
  251.       put "bomb3" into causeOfDeath
  252.       go to card id 3409
  253.       exit kaBoom
  254.     end if
  255.     put true into blastWall
  256.     if flood then
  257.       put false into flood
  258.       put 29888 into oldRoom
  259.       put 29230 into newRoom
  260.       roomChange
  261.       put 31445 into oldRoom
  262.       put 30913 into newRoom
  263.       roomChange
  264.       put 31944 into oldRoom
  265.       put 2539 into newRoom
  266.       roomChange
  267.       put 12023 into oldRoom
  268.       put 7465 into newRoom
  269.       roomChange
  270.     else
  271.       put 12023 into oldRoom
  272.       put 12716 into newRoom
  273.       roomChange
  274.     end if
  275.     exit kaBoom
  276.   end if
  277.   if bombLoc=26200 or bombLoc=27851 then
  278.     if cardID=30913 then
  279.       put "bomb4" into causeOfDeath
  280.       go to card id 3409
  281.       exit kaBoom
  282.     end if
  283.     put true into blastDam
  284.     put 30913 into oldRoom
  285.     put 33443 into newRoom
  286.     roomChange
  287.     if blastWall=false then
  288.       put true into flood
  289.       put 29230 into oldRoom
  290.       put 29888 into newRoom
  291.       roomChange
  292.       put 2539 into oldRoom
  293.       put 31944 into newRoom
  294.       roomChange
  295.       if cardID=29230 then
  296.         put 29888 into prevID
  297.         go to card id 29888
  298.         put "The bomb goes off in a nearby room.  The shock of the blast knocks you unconcious (How long? Hard to say -- minutes? hours?)" into field 3
  299.         exit kaBoom
  300.       end if
  301.     end if
  302.     exit kaBoom
  303.   end if
  304.   if bombLoc=12023 then
  305.     put true into blastWall
  306.     put 24636 into oldRoom
  307.     put 25160 into newRoom
  308.     roomChange
  309.     exit kaBoom
  310.   end if
  311.   if bombLoc=21738 then
  312.     put true into hortaDead
  313.     put 21738 into oldRoom
  314.     put 7465 into newRoom
  315.     roomChange
  316.     exit kaBoom
  317.   end if
  318.   put "bomb5" into causeOfDeath
  319.   go to card id 3409
  320. end kaBoom
  321.  
  322.  
  323.  
  324.  
  325.  
  326. -- part 1 (button)
  327. -- low flags: 00
  328. -- high flags: A003
  329. -- rect: left=26 top=275 right=294 bottom=72
  330. -- title width / last selected line: 0
  331. -- icon id / first selected line: 0 / 0
  332. -- text alignment: 1
  333. -- font id: 0
  334. -- text size: 12
  335. -- style flags: 0
  336. -- line height: 16
  337. -- part name: North
  338. ----- HyperTalk script -----
  339. on mouseUp
  340.   global direction,cardID
  341.   put "north" into direction
  342.   send move to card id cardID
  343. end mouseUp
  344.  
  345.  
  346.  
  347. -- part 2 (button)
  348. -- low flags: 00
  349. -- high flags: A003
  350. -- rect: left=0 top=299 right=318 bottom=47
  351. -- title width / last selected line: 0
  352. -- icon id / first selected line: 0 / 0
  353. -- text alignment: 1
  354. -- font id: 0
  355. -- text size: 12
  356. -- style flags: 0
  357. -- line height: 16
  358. -- part name: West
  359. ----- HyperTalk script -----
  360. on mouseUp
  361.   global direction,cardID
  362.   put "west" into direction
  363.   send move to card id cardID
  364. end mouseUp
  365.  
  366.  
  367.  
  368.  
  369. -- part 3 (button)
  370. -- low flags: 00
  371. -- high flags: A003
  372. -- rect: left=52 top=299 right=318 bottom=99
  373. -- title width / last selected line: 0
  374. -- icon id / first selected line: 0 / 0
  375. -- text alignment: 1
  376. -- font id: 0
  377. -- text size: 12
  378. -- style flags: 0
  379. -- line height: 16
  380. -- part name: East
  381. ----- HyperTalk script -----
  382. on mouseUp
  383.   global direction,cardID
  384.   put "east" into direction
  385.   send move to card id cardID
  386. end mouseUp
  387.  
  388.  
  389.  
  390. -- part 4 (button)
  391. -- low flags: 00
  392. -- high flags: A003
  393. -- rect: left=26 top=323 right=342 bottom=72
  394. -- title width / last selected line: 0
  395. -- icon id / first selected line: 0 / 0
  396. -- text alignment: 1
  397. -- font id: 0
  398. -- text size: 12
  399. -- style flags: 0
  400. -- line height: 16
  401. -- part name: South
  402. ----- HyperTalk script -----
  403. on mouseUp
  404.   global direction,cardID
  405.   put "south" into direction
  406.   send move to card id cardID
  407. end mouseUp
  408.  
  409.  
  410.  
  411. -- part 5 (button)
  412. -- low flags: 00
  413. -- high flags: A003
  414. -- rect: left=104 top=275 right=294 bottom=151
  415. -- title width / last selected line: 0
  416. -- icon id / first selected line: 0 / 0
  417. -- text alignment: 1
  418. -- font id: 0
  419. -- text size: 12
  420. -- style flags: 0
  421. -- line height: 16
  422. -- part name: Up
  423. ----- HyperTalk script -----
  424. on mouseUp
  425.   global direction,cardID
  426.   put "up" into direction
  427.   send move to card id cardID
  428. end mouseUp
  429.  
  430.  
  431.  
  432. -- part 6 (button)
  433. -- low flags: 00
  434. -- high flags: A003
  435. -- rect: left=104 top=299 right=318 bottom=151
  436. -- title width / last selected line: 0
  437. -- icon id / first selected line: 0 / 0
  438. -- text alignment: 1
  439. -- font id: 0
  440. -- text size: 12
  441. -- style flags: 0
  442. -- line height: 16
  443. -- part name: Down
  444. ----- HyperTalk script -----
  445. on mouseUp
  446.   global direction,cardID
  447.   put "down" into direction
  448.   send move to card id cardID
  449. end mouseUp
  450.  
  451.  
  452.  
  453. -- part 7 (button)
  454. -- low flags: 00
  455. -- high flags: A003
  456. -- rect: left=156 top=275 right=294 bottom=203
  457. -- title width / last selected line: 0
  458. -- icon id / first selected line: 0 / 0
  459. -- text alignment: 1
  460. -- font id: 0
  461. -- text size: 12
  462. -- style flags: 0
  463. -- line height: 16
  464. -- part name: Enter
  465. ----- HyperTalk script -----
  466. on mouseUp
  467.   global direction,cardID
  468.   put "enter" into direction
  469.   send move to card id cardID
  470. end mouseUp
  471.  
  472.  
  473.  
  474. -- part 8 (button)
  475. -- low flags: 00
  476. -- high flags: A003
  477. -- rect: left=208 top=275 right=294 bottom=255
  478. -- title width / last selected line: 0
  479. -- icon id / first selected line: 0 / 0
  480. -- text alignment: 1
  481. -- font id: 0
  482. -- text size: 12
  483. -- style flags: 0
  484. -- line height: 16
  485. -- part name: Take
  486. ----- HyperTalk script -----
  487. on mouseUp
  488.   global examFlag,takeFlag,carried
  489.   put false into examFlag
  490.   if carried < 3
  491.   then
  492.   put "click on the object you want to take" into field 3
  493.   put true into takeFlag
  494. else
  495.   beep
  496.   put "you may only carry 3 items at once" into field 3
  497. end if
  498. end mouseUp
  499.  
  500.  
  501.  
  502. -- part 9 (button)
  503. -- low flags: 00
  504. -- high flags: A003
  505. -- rect: left=208 top=299 right=318 bottom=255
  506. -- title width / last selected line: 0
  507. -- icon id / first selected line: 0 / 0
  508. -- text alignment: 1
  509. -- font id: 0
  510. -- text size: 12
  511. -- style flags: 0
  512. -- line height: 16
  513. -- part name: Drop
  514. ----- HyperTalk script -----
  515. on mouseUp
  516.   global examFlag,useFlag,dropFlag,invLoc
  517.   put false into examFlag
  518.   put false into useFlag
  519.   put true into dropFlag
  520.   go to card id invLoc
  521. end mouseUp
  522.  
  523.  
  524.  
  525.  
  526. -- part 10 (button)
  527. -- low flags: 00
  528. -- high flags: A003
  529. -- rect: left=156 top=299 right=318 bottom=203
  530. -- title width / last selected line: 0
  531. -- icon id / first selected line: 0 / 0
  532. -- text alignment: 1
  533. -- font id: 0
  534. -- text size: 12
  535. -- style flags: 0
  536. -- line height: 16
  537. -- part name: Exit
  538. ----- HyperTalk script -----
  539. on mouseUp
  540.   global direction,cardID
  541.   put "exit" into direction
  542.   send move to card id cardID
  543. end mouseUp
  544.  
  545.  
  546.  
  547. -- part 11 (button)
  548. -- low flags: 00
  549. -- high flags: A003
  550. -- rect: left=260 top=299 right=318 bottom=356
  551. -- title width / last selected line: 0
  552. -- icon id / first selected line: 0 / 0
  553. -- text alignment: 1
  554. -- font id: 0
  555. -- text size: 12
  556. -- style flags: 0
  557. -- line height: 16
  558. -- part name: Use object
  559. ----- HyperTalk script -----
  560. on mouseUp
  561.   global examFlag,useFlag,dropFlag,invLoc
  562.   put false into examFlag
  563.   put true into useFlag
  564.   put false into dropFlag
  565.   go to card id invLoc
  566. end mouseUp
  567.  
  568.  
  569.  
  570.  
  571. -- part 12 (button)
  572. -- low flags: 00
  573. -- high flags: A003
  574. -- rect: left=260 top=275 right=294 bottom=356
  575. -- title width / last selected line: 0
  576. -- icon id / first selected line: 0 / 0
  577. -- text alignment: 1
  578. -- font id: 0
  579. -- text size: 12
  580. -- style flags: 0
  581. -- line height: 16
  582. -- part name: Examine
  583. ----- HyperTalk script -----
  584. on mouseUp
  585.   global examFlag,takeFlag
  586.   put "click on what you want to examine" into field 3
  587.   put true into examFlag
  588.   put false into takeFlag
  589. end mouseUp
  590.  
  591.  
  592.  
  593. -- part 13 (button)
  594. -- low flags: 00
  595. -- high flags: A003
  596. -- rect: left=260 top=323 right=342 bottom=357
  597. -- title width / last selected line: 0
  598. -- icon id / first selected line: 0 / 0
  599. -- text alignment: 1
  600. -- font id: 0
  601. -- text size: 12
  602. -- style flags: 0
  603. -- line height: 16
  604. -- part name: Inventory
  605. ----- HyperTalk script -----
  606. on mouseUp
  607.   global examFlag,useFlag,dropFlag,invLoc
  608.   put true into examFlag
  609.   put false into useFlag
  610.   put false into dropFlag
  611.   go to card id invLoc
  612. end mouseUp
  613.  
  614.  
  615.  
  616.  
  617. -- part 24 (field)
  618. -- low flags: 01
  619. -- high flags: 2007
  620. -- rect: left=257 top=0 right=172 bottom=512
  621. -- title width / last selected line: 0
  622. -- icon id / first selected line: 0 / 0
  623. -- text alignment: 0
  624. -- font id: 3
  625. -- text size: 12
  626. -- style flags: 0
  627. -- line height: 16
  628. -- part name: 
  629.  
  630.  
  631. -- part 25 (field)
  632. -- low flags: 01
  633. -- high flags: 0000
  634. -- rect: left=364 top=286 right=322 bottom=503
  635. -- title width / last selected line: 0
  636. -- icon id / first selected line: 0 / 0
  637. -- text alignment: 1
  638. -- font id: 3
  639. -- text size: 12
  640. -- style flags: 0
  641. -- line height: 16
  642. -- part name: 
  643.  
  644.  
  645. -- part 27 (field)
  646. -- low flags: 01
  647. -- high flags: 2000
  648. -- rect: left=257 top=178 right=267 bottom=512
  649. -- title width / last selected line: 0
  650. -- icon id / first selected line: 0 / 0
  651. -- text alignment: 0
  652. -- font id: 3
  653. -- text size: 12
  654. -- style flags: 0
  655. -- line height: 16
  656. -- part name: 
  657.  
  658.  
  659. -- part 32 (button)
  660. -- low flags: 00
  661. -- high flags: A003
  662. -- rect: left=156 top=323 right=342 bottom=203
  663. -- title width / last selected line: 0
  664. -- icon id / first selected line: 0 / 0
  665. -- text alignment: 1
  666. -- font id: 0
  667. -- text size: 12
  668. -- style flags: 0
  669. -- line height: 16
  670. -- part name: Back
  671. ----- HyperTalk script -----
  672. on mouseUp
  673.   global direction,cardID
  674.   put "back" into direction
  675.   send move to card id cardID
  676. end mouseUp
  677.  
  678.  
  679.  
  680. -- part 33 (button)
  681. -- low flags: 00
  682. -- high flags: A003
  683. -- rect: left=104 top=323 right=342 bottom=151
  684. -- title width / last selected line: 0
  685. -- icon id / first selected line: 0 / 0
  686. -- text alignment: 1
  687. -- font id: 0
  688. -- text size: 12
  689. -- style flags: 0
  690. -- line height: 16
  691. -- part name: Rear
  692. ----- HyperTalk script -----
  693. on mouseUp
  694.   global direction,cardID
  695.   put "rear" into direction
  696.   send move to card id cardID
  697. end mouseUp
  698.  
  699.  
  700.  
  701. -- part 36 (field)
  702. -- low flags: 81
  703. -- high flags: 0000
  704. -- rect: left=0 top=324 right=342 bottom=14
  705. -- title width / last selected line: 0
  706. -- icon id / first selected line: 0 / 0
  707. -- text alignment: 0
  708. -- font id: 3
  709. -- text size: 12
  710. -- style flags: 0
  711. -- line height: 16
  712. -- part name: init
  713.